document.addEventListener('DOMContentLoaded', function() {
    const orderDetailToggle = document.getElementById('orderDetailToggle');
    const orderDetails = document.getElementById('orderDetails');
    const toggleIcon = document.querySelector('.toggle-icon');

    orderDetailToggle.addEventListener('click', function() {
        if (orderDetails.style.display === 'none' || orderDetails.style.display === '') {
            orderDetails.style.display = 'block';
            toggleIcon.innerHTML = '&#9662;';  // 向下箭头
        } else {
            orderDetails.style.display = 'none';
            toggleIcon.innerHTML = '&#9656;';  // 向右箭头
        }
    });
});
